package com.cmxh.shipper.controller;

import com.cmxh.shipper.pojo.ShipperConfig;
import com.cmxh.shipper.service.ShipperConfigService;
import com.cmxh.shipper.util.Code;
import com.cmxh.shipper.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*
 *
 *合作配置表Controller
 * */
@RestController
@RequestMapping("/shipperConfig")
public class ShipperConfigcontroller {
    @Autowired
    private ShipperConfigService shipperConfigService;

    @RequestMapping("/select/{shipperid}")
    public Result select(@PathVariable Integer shipperid) {
        ShipperConfig shipperConfig = shipperConfigService.selectByShipperId(shipperid);
        if (shipperConfig != null) {
            return new Result(Code.GET_OK, shipperConfig, "查询成功");
        } else {
            return new Result(Code.GET_ERR, "查询失败");
        }
    }


}